/**
 * Created by wuli等等 on 2017/2/28.
 */
import React, { Component, PropTypes } from 'react';
import { View, Text,StyleSheet ,TouchableNativeFeedback } from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
import Back from './Back';

export default class HeaderAndBack extends Component {


    render() {
        const { navigator } = this.props;
        return (
            <View style={styles.header}>
                <Back navigator = { navigator }/>
                <View style={styles.headerText}>
                    <Text style={styles.text}>
                        {this.props.text || "标题头"}
                    </Text>
                </View>
            </View>
        )
    }
}
const styles=StyleSheet.create({
    header:{
        backgroundColor:'#0767c8',
        height:40,
        flexDirection:'row',
    },
    back:{
        flex:1,
        justifyContent: 'center',
        marginLeft:5
    },
    headerText:{
        flex:35,
        marginLeft:-30,
        alignItems: 'center',
        justifyContent: 'center'
    },
    text:{
        color:'#ffffff',
        fontSize:18,
    }

});